﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DesignPatternDefinitions;

namespace dpatoolkit.UILayer
{
    /// <summary>
    /// Manages the IUIProjects in the Application
    /// </summary>
    interface IUIProjectManager
    {
        /// <summary>
        /// Analyses the file provided by filename and returns the
        /// project interface.
        /// </summary>
        /// <param name="filename"></param>
        /// <returns></returns>
        IUIProjectUnit GetProject(string filename);

        /// <summary>
        /// Create a new project;
        /// </summary>
        /// <param name="projType"></param>
        /// <returns></returns>
        IUIProjectUnit GetProject(ProjectType projType);

        /// <summary>
        /// Create a project from the IProject interface
        /// </summary>
        /// <param name="proj"></param>
        /// <returns></returns>
        IUIProjectUnit GetProject(IProject proj);

        IList<IUIProjectUnit> Projects { get; }

        /// <summary>
        /// Saves all the projects
        /// </summary>
        void SaveAll(bool confirm);

        /// <summary>
        /// Closes all the projects
        /// </summary>
        void CloseAll();

    }
}
